/* eslint-disable import/default */

require('./favicon.ico');
require('./styles/styles.less');

import React from 'react';
import ReactDOM from 'react-dom';

import {hashHistory, Router, Route, IndexRedirect} from 'react-router';

import DesignPage from './pages/DesignPage';
import HomePage from './pages/HomePage';
import LoginPage from './pages/LoginPage';
import RegisterPage from './pages/RegisterPage';
import Navi from './components/Navi';

const routes = (
  <Router history={hashHistory}>
    <Route path="/" component={Navi}>
      <IndexRedirect to="/home"/>
      <Route path="/home" component={HomePage}/>
      <Route path="/design" component={DesignPage}/>
      <Route path="/login" component={LoginPage}/>
      <Route path="/register" component={RegisterPage}/>
    </Route>
  </Router>
);


ReactDOM.render(
  routes,
  document.getElementById('app')
);
